import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;

public class MainWindow {
    public static void open(Display display) {
        Shell shell = new Shell(display);
        shell.setText("主界面 - 学生管理系统");
        shell.setSize(400, 300);

        Label welcome = new Label(shell, SWT.CENTER);
        welcome.setText("欢迎进入学生管理系统主界面！");
        welcome.setBounds(50, 100, 300, 30);

        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) display.sleep();
        }
    }
}

